//
//  UILable_HX.m
//  03-UITouch
//
//  Created by 韩旭 on 16/7/18.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "UILable_HX.h"

@implementation UILable_HX
- (instancetype)init {
    self = [super init];
    if (self) {
        [self packWithLableText:_text Frame:_frame Color:_color target:_target Action:_action];
    }
    return self;
}
-(UILabel *)packWithLableText:(NSString *)text Frame:(CGRect)frame Color:(UIColor *)color target:(id)target Action:(SEL)action {
    UILabel *lable = [[UILabel alloc] initWithFrame:frame];
    lable.text = text;
    lable.backgroundColor = color;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init];
    lable.userInteractionEnabled = YES;
    [lable addGestureRecognizer:tap];
    [tap addTarget:target action:action];
    return lable;
}
@end
